﻿using System;
using System.Web;
using System.Web.Services;
using Meqs.Entity;
using Meqs.Logic.Interface;

public partial class Base_School_SchSchoolInfo : ContainerBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [WebMethod]
    public static void UpdateSchoolName(string schoolName)
    {
        ISchoolInfoLogic logic = Container<ISchoolInfoLogic>.Instance;
        SchoolInfo sch = logic.FindById(1);
        sch.SchoolName = schoolName;
        logic.Update(sch);

        // 更新Session
        Perm perm = HttpContext.Current.Session["UserInfo"] as Perm;
        if (perm == null) return;
        perm.SchoolName = schoolName;
        HttpContext.Current.Session["UserInfo"] = perm;
    }
}
